﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    主页
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        <%: ViewData["Message"] %></h2>
    <p>
        若要了解有关 ASP.NET MVC 的更多信息，请访问 <a href="http://asp.net/mvc" title="ASP.NET MVC 网站">http://asp.net/mvc</a>。
    </p>
    <%using (Html.BeginForm())
      { %>
    分类：
    <%=Html.ActionLink("同步导学", "Index", new { keyword = Request.QueryString["keyword"], categoryName = "同步导学", gid = Request.QueryString["gid"], sid = Request.QueryString["sid"] })%>
    <%=Html.ActionLink("同步精讲", "Index", new { keyword = Request.QueryString["keyword"], categoryName = "同步精讲", gid = Request.QueryString["gid"], sid = Request.QueryString["sid"] })%>
    <%=Html.ActionLink("名师课程", "Index", new { keyword = Request.QueryString["keyword"], categoryName = "名师课程", gid = Request.QueryString["gid"], sid = Request.QueryString["sid"] })%>
    <hr />
    年级：<%=Html.ActionLink("一年级", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = "一年级", sid = Request.QueryString["sid"] })%>
    <%=Html.ActionLink("二年级", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = "二年级", sid = Request.QueryString["sid"] })%>
    <hr />
    科目：
    <%=Html.ActionLink("数学", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = Request.QueryString["gid"], sid = "数学" })%>
    <%=Html.ActionLink("语文", "Index", new { keyword = Request.QueryString["keyword"], categoryName = Request.QueryString["categoryName"], gid = Request.QueryString["gid"], sid = "语文" })%>
    <hr />
    关键字:<%=Html.TextBox("keyword")%><input type="submit" value="检索" /><hr />
    <%=Html.TextBox("categoryName",Request.QueryString["categoryName"])%>
    <%=Html.TextBox("gid", Request.QueryString["gid"])%>
    <%=Html.TextBox("sid", Request.QueryString["sid"])%>
    <%foreach (var i in (ViewData["result"] as CommonSearchModule.SearchResult).Result)
      {
    %>
    课程ID:<%=i.ID%>
    课程名称:<%=i.Name%>
    分类:<%=i.CategoryName%><br />
    年级科目：<%=i.PropertyName %>
    发布时间：<%=i.PackageTime %>
    Info:<%=i.Info%><hr />
    <%
      } %>
    <%=ViewData["page"] %>
    <%} %>
</asp:Content>
